import { createApp } from 'vue'
import {createI18n} from "vue-i18n";
import App from './App.vue'
import router from './router'
import store from './store'
import ElementPlus from 'element-plus';
import '../public/css/reset.css'
import 'element-plus/lib/theme-chalk/index.css';
import '@/assets/css/font-awesome.css'
import '@/assets/scss/transition.scss'
import zhLocale from 'element-plus/lib/locale/lang/zh-cn'
import messages from './customLocale'
const i18n = createI18n({
  // @ts-ignore
  locale: store.state.app.language,
  // @ts-ignore
  fallbackLocale: store.state.app.language,
  messages,
})

const app = createApp(App)
app.use(store)
app.use(router)
app.use(ElementPlus,{i18n: i18n.global.t})
app.use(i18n)
app.mount('#app')
